﻿using MvcArchStarter.Core.Ioc;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;

namespace MvcArchStarter.Infrastructure.Persistence
{
    [DependencyDiscovery(typeof(IContextFactory), IocLifetime.Singleton)]
    public class DefaultContextFactory : IContextFactory
    {
        public DefaultContextFactory()
        { }

        public System.Data.Entity.DbContext Create()
        {
            Database.SetInitializer(new TestDataInitializer());
            return new MvcArchStarterContext();
        }
    }
}
